﻿using BCEntity.TMS.Packing.PackingCategoryConfig;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.Packing.PackingCategoryConfig
{
    /// <summary>
    /// 包装材料分类配置
    /// </summary>
    public interface IPackingCategoryConfigData
    {
        /// <summary>
        /// 根据包装材料分类，获取包装材料分类配置
        /// </summary>
        /// <param name="packingCategory">包装材料分类</param>
        /// <returns></returns>
        Task<PackingCategoryConfigEntity> GetByPackingCategory(string packingCategory);

        /// <summary>
        /// 添加包装材料分类配置
        /// </summary>
        /// <param name="entity">包装材料分类配置信息</param>
        /// <returns></returns>
        Task<PackingCategoryConfigEntity> Insert(PackingCategoryConfigEntity entity);

        /// <summary>
        /// 获取添加包装材料分类配置
        /// </summary>
        /// <param name="packingCategoryConfigId">包装材料分类配置Id</param>
        /// <returns></returns>
        Task<PackingCategoryConfigEntity> GetEntity(int packingCategoryConfigId);

        /// <summary>
        /// 获取添加包装材料分类配置列表
        /// </summary>
        /// <returns></returns>
        Task<IEnumerable<PackingCategoryConfigEntity>> GetList();

        /// <summary>
        /// 更新包装材料分类配置
        /// </summary>
        /// <param name="entity">包装材料分类配置信息</param>
        /// <returns></returns>
        Task<PackingCategoryConfigEntity> Update(PackingCategoryConfigEntity entity);

        /// <summary>
        /// 删除包装材料分类配置
        /// </summary>
        /// <param name="packingCategoryConfigId">包装材料分类配置Id</param>
        /// <returns></returns>
        Task<int> Delete(int packingCategoryConfigId);

        /// <summary>
        /// 获取添加包装材料分类配置
        /// </summary>
        /// <param name="packingCategory">包装材料分类</param>
        /// <param name="createStartDate">创建开始日期</param>
        /// <param name="createEndDate">创建结束日期</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<PackingCategoryConfigEntity>, int)> Query(string packingCategory, DateTime? createStartDate, DateTime? createEndDate, int pageIndex, int pageSize);
    }
}
